/**
 * @config 转换配置
 */
export const CURRENCY = { style: 'currency', currency: 'CNY' }
export const PERCENT = { style: 'percent', maximumFractionDigits: 2, }

/**
 * @desc 数字转换
 * @param config
 * @returns
 */
export const numberFormat = (config: Record<string, string | number>) => new Intl.NumberFormat(navigator.language, config)


// timeStyle: "medium",
// dateStyle: "short",
export const SHORT_TIME = {
  timeStyle: "medium",
  dateStyle: "short",
}

export const LONG_TIME = {
  timeStyle: "medium",
  dateStyle: "long",
}

export const dateFormat = (config?: Record<string, string | number>) => new Intl.DateTimeFormat(navigator.language, config)
